/*
 * MainView.java
 *
 * Created on November 18, 2007, 4:53 PM
 */

package edu.view;

import advancedModels.*;
import edu.sql.OracleConnector;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import models.BenefitModel;
import models.DepartmentModel;
import models.EmployeeModel;
import models.PartTimeModel;
import models.ProjectModel;
import models.ProjectRolesModel;
import models.RoleModel;

/**
 *
 * @author  joseacuna-rohter
 */
public class MainView extends javax.swing.JFrame {
    
    /** Creates new form MainView */
    public MainView() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        mainTab = new javax.swing.JTabbedPane();
        dataUpdatePanel = new javax.swing.JPanel();
        dataUpdateTitle = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        dataQueryPanel = new javax.swing.JPanel();
        dataQueryTitle = new javax.swing.JLabel();
        jSeparator4 = new javax.swing.JSeparator();
        jScrollPane1 = new javax.swing.JScrollPane();
        queryTable = new javax.swing.JTable();
        selectQueryLabel = new javax.swing.JLabel();
        runQueryButton = new javax.swing.JButton();
        queryComboBox = new javax.swing.JComboBox();
        colOne = new javax.swing.JTextField();
        colTwo = new javax.swing.JTextField();
        colThree = new javax.swing.JTextField();
        colFour = new javax.swing.JTextField();
        colFive = new javax.swing.JTextField();
        colSix = new javax.swing.JTextField();
        filtersLabel = new javax.swing.JLabel();
        colOneLabel = new javax.swing.JLabel();
        colTwoLabel = new javax.swing.JLabel();
        colThreeLabel = new javax.swing.JLabel();
        ColFourLabel = new javax.swing.JLabel();
        ColFiveLabel = new javax.swing.JLabel();
        ColSixLabel = new javax.swing.JLabel();
        colSevenLabel = new javax.swing.JLabel();
        colEightLabel = new javax.swing.JLabel();
        colNineLabel = new javax.swing.JLabel();
        colSeven = new javax.swing.JTextField();
        colEight = new javax.swing.JTextField();
        colNine = new javax.swing.JTextField();
        colTenLabel = new javax.swing.JLabel();
        colElevenLabel = new javax.swing.JLabel();
        colTwelveLabel = new javax.swing.JLabel();
        colTen = new javax.swing.JTextField();
        colEleven = new javax.swing.JTextField();
        colTwelve = new javax.swing.JTextField();
        RecordCountLabel = new javax.swing.JLabel();
        resultCount = new javax.swing.JLabel();
        dateLabel = new javax.swing.JLabel();
        dataEntryPanel = new javax.swing.JPanel();
        dataEntryTable = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        actionLabel = new javax.swing.JLabel();
        actionCombo = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        Field1 = new javax.swing.JTextField();
        Field2 = new javax.swing.JTextField();
        Field3 = new javax.swing.JTextField();
        Field4 = new javax.swing.JTextField();
        Field5 = new javax.swing.JTextField();
        Field6 = new javax.swing.JTextField();
        Field7 = new javax.swing.JTextField();
        Field8 = new javax.swing.JTextField();
        Field9 = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        Field10 = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        Field11 = new javax.swing.JTextField();
        Field12 = new javax.swing.JTextField();
        enter = new javax.swing.JButton();
        clearButton = new javax.swing.JButton();
        jLabel13 = new javax.swing.JLabel();
        Field13 = new javax.swing.JTextField();
        info = new javax.swing.JLabel();
        advancedQueries = new javax.swing.JPanel();
        title = new javax.swing.JLabel();
        jSeparator5 = new javax.swing.JSeparator();
        queryListCombo = new javax.swing.JComboBox();
        queryLabel = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        queryTable2 = new javax.swing.JTable();
        runButton = new javax.swing.JButton();
        condition1Label = new javax.swing.JLabel();
        condition2Label = new javax.swing.JLabel();
        condition1Field = new javax.swing.JTextField();
        condition2Field = new javax.swing.JTextField();
        instructionLabel = new javax.swing.JLabel();
        DataDeletionPanel = new javax.swing.JPanel();
        dataDeletionTitle = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        deleteComboBox = new javax.swing.JComboBox();
        runDelete = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        idOne = new javax.swing.JTextField();
        idTwo = new javax.swing.JTextField();
        idOneLabel = new javax.swing.JLabel();
        idTwoLabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Employee Control");
        dataUpdateTitle.setFont(new java.awt.Font("Bank Gothic", 1, 13));
        dataUpdateTitle.setText("Data Update");

        org.jdesktop.layout.GroupLayout dataUpdatePanelLayout = new org.jdesktop.layout.GroupLayout(dataUpdatePanel);
        dataUpdatePanel.setLayout(dataUpdatePanelLayout);
        dataUpdatePanelLayout.setHorizontalGroup(
            dataUpdatePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(dataUpdatePanelLayout.createSequentialGroup()
                .add(dataUpdatePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(dataUpdatePanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1038, Short.MAX_VALUE))
                    .add(dataUpdatePanelLayout.createSequentialGroup()
                        .add(432, 432, 432)
                        .add(dataUpdateTitle)))
                .addContainerGap())
        );
        dataUpdatePanelLayout.setVerticalGroup(
            dataUpdatePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(dataUpdatePanelLayout.createSequentialGroup()
                .add(20, 20, 20)
                .add(dataUpdateTitle)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(513, Short.MAX_VALUE))
        );
        mainTab.addTab("Data Update", dataUpdatePanel);

        dataQueryTitle.setFont(new java.awt.Font("Bank Gothic", 1, 13));
        dataQueryTitle.setText("Data Query");

        ResultSet rs=getResultSet("EMPLOYEE");
        queryTable.setModel(new EmployeeModel(rs));
        //mdbc.close(rs);
        queryTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                queryTableMouseClicked(evt);
            }
        });

        jScrollPane1.setViewportView(queryTable);

        selectQueryLabel.setFont(new java.awt.Font("Arial Black", 0, 13));
        selectQueryLabel.setText("Select  a Query:");

        runQueryButton.setText("Run!");
        runQueryButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                runQueryButtonActionPerformed(evt);
            }
        });

        queryComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Employee Info", "Department Info", "Project Info", "Benefit Info", "Project Roles", "Part Time Salary", "Role Info" }));
        queryComboBox.setMaximumSize(new java.awt.Dimension(3276, 3276));
        queryComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                queryComboBoxActionPerformed(evt);
            }
        });

        filtersLabel.setFont(new java.awt.Font("Arial Black", 0, 13));
        filtersLabel.setText("Filters:");

        colOneLabel.setText("Column 1:");

        colTwoLabel.setText("Column 2:");

        colThreeLabel.setText("Column 3:");

        ColFourLabel.setText("Column 4:");

        ColFiveLabel.setText("Column 5:");

        ColSixLabel.setText("Column 6:");

        colSevenLabel.setText("Column 7:");

        colEightLabel.setText("Column 8:");

        colNineLabel.setText("Column 9:");

        colTenLabel.setText("Column 10:");

        colElevenLabel.setText("Column 11:");

        colTwelveLabel.setText("Column 12:");

        RecordCountLabel.setFont(new java.awt.Font("Arial Black", 1, 13));
        RecordCountLabel.setText("Record Count:");

        resultCount.setText("0");

        dateLabel.setFont(new java.awt.Font("Arial Black", 0, 13));
        dateLabel.setText("Dates Must be in DD-MMM-YYYY");

        org.jdesktop.layout.GroupLayout dataQueryPanelLayout = new org.jdesktop.layout.GroupLayout(dataQueryPanel);
        dataQueryPanel.setLayout(dataQueryPanelLayout);
        dataQueryPanelLayout.setHorizontalGroup(
            dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(dataQueryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(dataQueryPanelLayout.createSequentialGroup()
                        .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1038, Short.MAX_VALUE)
                        .addContainerGap())
                    .add(dataQueryPanelLayout.createSequentialGroup()
                        .add(filtersLabel)
                        .addContainerGap(1008, Short.MAX_VALUE))
                    .add(dataQueryPanelLayout.createSequentialGroup()
                        .add(RecordCountLabel)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(resultCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 96, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, dataQueryPanelLayout.createSequentialGroup()
                        .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, dataQueryPanelLayout.createSequentialGroup()
                                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 795, Short.MAX_VALUE)
                                    .add(org.jdesktop.layout.GroupLayout.TRAILING, dataQueryPanelLayout.createSequentialGroup()
                                        .add(dataQueryTitle)
                                        .add(300, 300, 300))
                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                        .add(selectQueryLabel)
                                        .add(37, 37, 37)
                                        .add(queryComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 251, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .add(33, 33, 33)
                                        .add(dateLabel)))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(runQueryButton))
                            .add(dataQueryPanelLayout.createSequentialGroup()
                                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                        .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(dataQueryPanelLayout.createSequentialGroup()
                                                .add(colOneLabel)
                                                .add(15, 15, 15)
                                                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                                    .add(org.jdesktop.layout.GroupLayout.TRAILING, colTwo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                                    .add(org.jdesktop.layout.GroupLayout.TRAILING, colOne, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                                    .add(colThree, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
                                                .add(60, 60, 60)
                                                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                                        .add(ColFourLabel)
                                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                                        .add(colFour, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                                        .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                                            .add(org.jdesktop.layout.GroupLayout.LEADING, ColSixLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                            .add(org.jdesktop.layout.GroupLayout.LEADING, ColFiveLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                                        .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                                            .add(colSix, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                                            .add(colFive, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
                                            .add(colThreeLabel))
                                        .add(25, 25, 25)
                                        .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                            .add(dataQueryPanelLayout.createSequentialGroup()
                                                .add(colEightLabel)
                                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                                .add(colEight))
                                            .add(dataQueryPanelLayout.createSequentialGroup()
                                                .add(colSevenLabel)
                                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                                .add(colSeven, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 81, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                            .add(dataQueryPanelLayout.createSequentialGroup()
                                                .add(colNineLabel)
                                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                                .add(colNine))))
                                    .add(colTwoLabel))
                                .add(26, 26, 26)
                                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                        .add(colTenLabel)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(colTen, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 91, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                        .add(colElevenLabel)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(colEleven))
                                    .add(dataQueryPanelLayout.createSequentialGroup()
                                        .add(colTwelveLabel)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(colTwelve)))))
                        .add(179, 179, 179))))
        );
        dataQueryPanelLayout.setVerticalGroup(
            dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, dataQueryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(dataQueryTitle)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(selectQueryLabel)
                    .add(queryComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(dateLabel)
                    .add(runQueryButton))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(filtersLabel)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(colOneLabel)
                    .add(colOne, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(ColFourLabel)
                    .add(colFour, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colSevenLabel)
                    .add(colSeven, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colTenLabel)
                    .add(colTen, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(colTwoLabel)
                    .add(colTwo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(ColFiveLabel)
                    .add(colFive, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colEightLabel)
                    .add(colEight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colElevenLabel)
                    .add(colEleven, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(colThreeLabel)
                    .add(ColSixLabel)
                    .add(colSix, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colNineLabel)
                    .add(colNine, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colTwelveLabel)
                    .add(colTwelve, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(colThree, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 38, Short.MAX_VALUE)
                .add(dataQueryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(RecordCountLabel)
                    .add(resultCount))
                .add(32, 32, 32)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 250, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        mainTab.addTab("Data Query", dataQueryPanel);

        dataEntryTable.setFont(new java.awt.Font("Bank Gothic", 1, 13));
        dataEntryTable.setText("Data Entry");

        actionLabel.setFont(new java.awt.Font("Arial Black", 0, 13));
        actionLabel.setText("Action:");

        actionCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "New Employee", "New Project", "Assign to Project", "New Project Role", "New Benefit", "New Department", "New Colaborator Department", "Nominate Department of Year", "Set Winning Department of Year", "New Role", "Assign Benefit", "Assign Department", "New PT Category", "New PT Employee" }));
        actionCombo.setMaximumSize(new java.awt.Dimension(3276, 3276));
        actionCombo.setPreferredSize(new java.awt.Dimension(229, 27));
        actionCombo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                actionComboActionPerformed(evt);
            }
        });

        jLabel1.setText("Label 1:");

        jLabel2.setText("Label 2:");

        jLabel3.setText("Label 3:");

        jLabel4.setText("Label 4:");

        jLabel5.setText("Label 5:");

        jLabel6.setText("Label 6:");

        jLabel7.setText("Label 7:");

        jLabel8.setText("Label 8:");

        jLabel9.setText("Label 9:");

        jLabel10.setText("Label 10:");

        jLabel11.setText("Label 11:");

        jLabel12.setText("Label 12:");

        enter.setText("Enter");
        enter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                enterActionPerformed(evt);
            }
        });

        clearButton.setText("Clear");
        clearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clearButtonActionPerformed(evt);
            }
        });

        jLabel13.setText("Label 13:");

        info.setText("Dates are in dd-mmm-yyyyy");

        org.jdesktop.layout.GroupLayout dataEntryPanelLayout = new org.jdesktop.layout.GroupLayout(dataEntryPanel);
        dataEntryPanel.setLayout(dataEntryPanelLayout);
        dataEntryPanelLayout.setHorizontalGroup(
            dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(dataEntryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(dataEntryPanelLayout.createSequentialGroup()
                        .add(jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1038, Short.MAX_VALUE)
                        .addContainerGap())
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, dataEntryPanelLayout.createSequentialGroup()
                        .add(dataEntryTable)
                        .add(411, 411, 411))
                    .add(dataEntryPanelLayout.createSequentialGroup()
                        .add(actionLabel)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(actionCombo, 0, 195, Short.MAX_VALUE)
                        .add(52, 52, 52)
                        .add(info)
                        .add(573, 573, 573))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, dataEntryPanelLayout.createSequentialGroup()
                        .add(enter)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(clearButton)
                        .add(131, 131, 131))
                    .add(dataEntryPanelLayout.createSequentialGroup()
                        .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel1)
                            .add(jLabel2)
                            .add(jLabel3)
                            .add(jLabel9)
                            .add(jLabel8)
                            .add(jLabel7)
                            .add(jLabel6)
                            .add(jLabel5)
                            .add(jLabel4)
                            .add(jLabel10)
                            .add(jLabel11)
                            .add(jLabel12)
                            .add(jLabel13))
                        .add(54, 54, 54)
                        .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, Field2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, Field1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field11, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                            .add(Field13, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        dataEntryPanelLayout.setVerticalGroup(
            dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(dataEntryPanelLayout.createSequentialGroup()
                .add(20, 20, 20)
                .add(dataEntryTable)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(actionLabel)
                    .add(actionCombo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(info))
                .add(20, 20, 20)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel1))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel3))
                .add(14, 14, 14)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel4))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel5))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel6))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel7))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel8))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel9))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(Field10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel10))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel11)
                    .add(Field11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel12)
                    .add(Field12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel13)
                    .add(Field13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 17, Short.MAX_VALUE)
                .add(dataEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(enter)
                    .add(clearButton))
                .add(25, 25, 25))
        );
        mainTab.addTab("Data Entry", dataEntryPanel);

        title.setFont(new java.awt.Font("Bank Gothic", 1, 13));
        title.setText("Advanced Query Entries");

        queryListCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Zip with Most Employees", "Number of Employees per Project", "Number of Employees with Benefit", "Employee With Role in Project", "Projects of Given Department", "Find Primary Department", "Find Colaborators", "Department Winners", "Department Candidates", "Program Managers", "Hardest Worker", "Laziest Worker" }));
        queryListCombo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                queryListComboActionPerformed(evt);
            }
        });

        queryLabel.setFont(new java.awt.Font("Arial Black", 1, 13));
        queryLabel.setText("Query List:");

        queryTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(queryTable2);

        runButton.setText("Run!");
        runButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                runButtonActionPerformed(evt);
            }
        });

        condition1Label.setText(" - :");

        condition2Label.setText(" - :");

        instructionLabel.setText("instructions");

        org.jdesktop.layout.GroupLayout advancedQueriesLayout = new org.jdesktop.layout.GroupLayout(advancedQueries);
        advancedQueries.setLayout(advancedQueriesLayout);
        advancedQueriesLayout.setHorizontalGroup(
            advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(advancedQueriesLayout.createSequentialGroup()
                .add(advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(advancedQueriesLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(jSeparator5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1038, Short.MAX_VALUE))
                    .add(advancedQueriesLayout.createSequentialGroup()
                        .add(434, 434, 434)
                        .add(title))
                    .add(advancedQueriesLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1038, Short.MAX_VALUE)))
                .addContainerGap())
            .add(advancedQueriesLayout.createSequentialGroup()
                .addContainerGap()
                .add(queryLabel)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(queryListCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 273, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(50, 50, 50)
                .add(instructionLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 440, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 18, Short.MAX_VALUE)
                .add(runButton)
                .add(119, 119, 119))
            .add(advancedQueriesLayout.createSequentialGroup()
                .addContainerGap()
                .add(advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, advancedQueriesLayout.createSequentialGroup()
                        .add(condition2Label)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(condition2Field))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, advancedQueriesLayout.createSequentialGroup()
                        .add(condition1Label)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(condition1Field, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(902, Short.MAX_VALUE))
        );
        advancedQueriesLayout.setVerticalGroup(
            advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(advancedQueriesLayout.createSequentialGroup()
                .addContainerGap()
                .add(title)
                .add(18, 18, 18)
                .add(jSeparator5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(queryLabel)
                    .add(queryListCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(runButton)
                    .add(instructionLabel))
                .add(31, 31, 31)
                .add(advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(condition1Label)
                    .add(condition1Field, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(24, 24, 24)
                .add(advancedQueriesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(condition2Label)
                    .add(condition2Field, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(83, 83, 83)
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 248, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
        );
        mainTab.addTab("Advanced Queries", advancedQueries);

        dataDeletionTitle.setFont(new java.awt.Font("Bank Gothic", 1, 13));
        dataDeletionTitle.setText("Data Deletion");

        deleteComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Benefits", "Candidate Department", "Collaborator Department", "Department", "Department of Year", "Employee", "Employee Assignment", "Employee Benefits", "Employee ID", "Employee Project", "Part Time", "Part Time Employee", "Project", "Project Roles", "Role" }));
        deleteComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteComboBoxActionPerformed(evt);
            }
        });

        runDelete.setText("Run!");
        runDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                runDeleteActionPerformed(evt);
            }
        });

        jLabel14.setText("Need Unique Identifier");

        idOne.setText("jTextField1");

        idTwo.setText("jTextField2");

        idOneLabel.setText("ID One");

        idTwoLabel.setText("ID Two");

        org.jdesktop.layout.GroupLayout DataDeletionPanelLayout = new org.jdesktop.layout.GroupLayout(DataDeletionPanel);
        DataDeletionPanel.setLayout(DataDeletionPanelLayout);
        DataDeletionPanelLayout.setHorizontalGroup(
            DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(DataDeletionPanelLayout.createSequentialGroup()
                .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(DataDeletionPanelLayout.createSequentialGroup()
                        .add(408, 408, 408)
                        .add(dataDeletionTitle))
                    .add(DataDeletionPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jSeparator3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1038, Short.MAX_VALUE)
                            .add(DataDeletionPanelLayout.createSequentialGroup()
                                .add(21, 21, 21)
                                .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(DataDeletionPanelLayout.createSequentialGroup()
                                        .add(deleteComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 208, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .add(221, 221, 221)
                                        .add(runDelete))
                                    .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                        .add(DataDeletionPanelLayout.createSequentialGroup()
                                            .add(idOneLabel)
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(idOne, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                        .add(jLabel14)
                                        .add(DataDeletionPanelLayout.createSequentialGroup()
                                            .add(idTwoLabel)
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(idTwo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))))
                .addContainerGap())
        );
        DataDeletionPanelLayout.setVerticalGroup(
            DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(DataDeletionPanelLayout.createSequentialGroup()
                .add(20, 20, 20)
                .add(dataDeletionTitle)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(deleteComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(runDelete))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel14)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(idOne, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(idOneLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(DataDeletionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(idTwo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(idTwoLabel))
                .addContainerGap(392, Short.MAX_VALUE))
        );
        mainTab.addTab("Data Deletion", DataDeletionPanel);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(mainTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1099, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(mainTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 616, Short.MAX_VALUE)
                .addContainerGap())
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void deleteComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteComboBoxActionPerformed
           String selected = deleteComboBox.getSelectedItem().toString();
        
            if(selected.equals("Benefits")){
                System.out.println("BENEFITS SELECTED");
                idOneLabel.setText("Benefit Name: ");
                idTwoLabel.setText(" - :");
            }
            else if(selected.equals("Candidate Department")){
                System.out.println("BENEFITS SELECTED");
                idOneLabel.setText("Year: ");
                idTwoLabel.setText("Department Name: ");
            }
    }//GEN-LAST:event_deleteComboBoxActionPerformed

    private void runDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runDeleteActionPerformed
            String selected = deleteComboBox.getSelectedItem().toString();
            String query = "";
            
            if(selected.equals("Benefits")){
                System.out.println("BENEFITS SELECTED");
                System.out.println(idOne.getText());
                System.out.println(idTwo.getText());
            }
            else if(selected.equals("Candidate Department")){
                System.out.println("Candidate Department");
                System.out.println(idOne.getText());
                System.out.println(idTwo.getText());
                oc.Execute("DELETE FROM CANDIDATEDEPARTMENTOFTHEYEAR" +
                        " WHERE YEAR = " +idOne.getText()+
                        " AND DEPARTMENTNAME = '"+ idTwo.getText() +"'");
            }
        
        
        
        
    }//GEN-LAST:event_runDeleteActionPerformed

    private void runButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runButtonActionPerformed
        String selected = queryListCombo.getSelectedItem().toString();
        System.out.println(selected);
        
        ResultSet rs=null;
        
        if(selected.equals("Employee With Role in Project")){
               rs=getAdvResultSet("SELECT a.EMPLOYEENUM,LASTNAME,FIRSTNAME," +
                      "PROJECTCODE,ROLENAME  " +
                      " FROM EMPLOYEE a,EMPLOYEEPROJECT b " +
                      "where a.EMPLOYEENUM = b.EMPLOYEENUM " +
                      "AND PROJECTCODE = '"+condition1Field.getText()+"' " +
                      "AND ROLENAME = '"+condition2Field.getText()+"'");
              queryTable2.setModel(new EmployeeRoleInProjectModel(rs));
         }
         else if(selected.equals("Zip with Most Employees")){
             
         rs=getAdvResultSet("SELECT COUNT(EMPLOYEENUM) AS " +
                "AMT,REGEXP_SUBSTR(ADDRESS,'[[:digit:]]{5}$') ZIP FROM EMPLOYEE " +
                "GROUP BY REGEXP_SUBSTR(ADDRESS,'[[:digit:]]{5}$') ORDER BY AMT DESC");

                queryTable2.setModel(new MaxZipModel(rs));
         }
        else if(selected.equals("Projects of Given Department")){
              if(condition1Field.getText().equals("all")){
                rs=getAdvResultSet("SELECT projectCode,projectName,primaryDepartmentName from PROJECT");
              }
              else{
                rs=getAdvResultSet("SELECT projectCode,projectName,primaryDepartmentName from PROJECT " +
                        "WHERE PRIMARYDEPARTMENTNAME = '"+ condition1Field.getText()+"'");               
              }
              
              queryTable2.setModel(new ProjectOfDepartmentModel(rs));
         }
         else if(selected.equals("Find Primary Department")){
              if(condition1Field.getText().equals("all")){
                rs=getAdvResultSet("SELECT projectCode, primaryDepartmentName FROM PROJECT");
              }
              else{
                rs=getAdvResultSet("SELECT projectCode, primaryDepartmentName FROM PROJECT " +
                        "WHERE PROJECTCODE = '"+ condition1Field.getText()+"'");               
              }
              
              queryTable2.setModel(new DepartmentOfProjectModel(rs));
         }
         else if(selected.equals("Find Colaborators")){
              if(condition1Field.getText().equals("all")){
                rs=getAdvResultSet("SELECT * FROM CollaboratorDepartment");
              }
              else{
                rs=getAdvResultSet("SELECT * FROM CollaboratorDepartment " +
                        "WHERE PROJECTCODE = '"+ condition1Field.getText()+"'");               
              }
              
              queryTable2.setModel(new CollaboratorDepartmentsModel(rs));
         }
         else if(selected.equals("Department Winners")){
              if(condition1Field.getText().equals("all")){
                rs=getAdvResultSet("SELECT * FROM DEPARTMENTOFTHEYEAR");
              }
              else{
                rs=getAdvResultSet("SELECT * FROM DEPARTMENTOFTHEYEAR " +
                        "WHERE YEAR = "+ condition1Field.getText()+"");               
              }
              
              queryTable2.setModel(new DepartmentOfYearModel(rs));
         }
         else if(selected.equals("Department Candidates")){
              if(condition1Field.getText().equals("all")){
                rs=getAdvResultSet("SELECT * FROM CANDIDATEDEPARTMENTOFTHEYEAR");
              }
              else{
                rs=getAdvResultSet("SELECT * FROM CANDIDATEDEPARTMENTOFTHEYEAR " +
                        "WHERE YEAR = "+ condition1Field.getText()+"");               
              }
              
              queryTable2.setModel(new DepartmentOfYearModel(rs));
         }
         else if(selected.equals("Program Managers")){
              
               rs=getAdvResultSet(" select projectCode,employeeNum,rolename " +
                       "from EmployeeProject where projectCode in (select projectCode " +
                       "from Project where status= 'on-hold') " +
                       "and rolename in ('Project Manager','Program Manager')");
              queryTable2.setModel(new ManagersModel(rs));
         }
         else if(selected.equals("Hardest Worker")){
              
               rs=getAdvResultSet("select employeeNum, count(*) from EmployeeProject " +
                       "group by employeeNum having count(*)=(select max(count(*)) " +
                       "from employeeProject group by employeeNum)");
              queryTable2.setModel(new HardestWorkerModel(rs));
         }
         else if(selected.equals("Laziest Worker")){
              
               rs=getAdvResultSet("select employeeNum, count(*) from EmployeeProject" +
                       " group by employeeNum having count(*)=(select min(count(*)) " +
                       "from employeeProject group by employeeNum)");
              queryTable2.setModel(new HardestWorkerModel(rs));
         }
        
        
        
    }//GEN-LAST:event_runButtonActionPerformed

    private void queryListComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_queryListComboActionPerformed
         String selected = queryListCombo.getSelectedItem().toString();
         System.out.println(selected);
         if(selected.equals("Number of Employees per Project")){
              ResultSet rs=getAdvResultSet("select count(e.employeeNum) c,e.projectCode,p.startdate,p.enddate" 
                + " from EmployeeProject e, Project p "
                + " where e.projectCode = p.projectCode"
                +" group by e.projectCode,p.STARTDATE,p.enddate" +
                 " ORDER BY c DESC");
              queryTable2.setModel(new EmployeesPerProjectModel(rs));
         }
         else if(selected.equals("Zip with Most Employees")){
             
        ResultSet rs=getAdvResultSet("SELECT COUNT(EMPLOYEENUM) AS " +
                "AMT,REGEXP_SUBSTR(ADDRESS,'[[:digit:]]{5}$') ZIP FROM EMPLOYEE " +
                "GROUP BY REGEXP_SUBSTR(ADDRESS,'[[:digit:]]{5}$') ORDER BY AMT DESC");

                queryTable2.setModel(new MaxZipModel(rs));
         }
         else if(selected.equals("Number of Employees with Benefit")){
              ResultSet rs=getAdvResultSet("select count(employeeNum) c, benefitName " +
                      "from EmployeeBenefits where benefitname is not null group by benefitname " +
                      "ORDER BY c DESC ");
              queryTable2.setModel(new EmployeesPerBenefitModel(rs));
         }
         else if(selected.equals("Employee With Role in Project")){
             instructionLabel.setText("Must Set Conditions");
             
             condition1Label.setText("Project Code:");
             condition2Label.setText("Role Name:");
         }
         else if(selected.equals("Projects of Given Department")){
             instructionLabel.setText("Must Set Conditions(Type <all> for all departments)");
             
             condition1Label.setText("Department:");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Find Primary Department")){
             instructionLabel.setText("Must Set Conditions(Type <all> for all projects)");
             
             condition1Label.setText("Project Code:");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Find Colaborators")){
             instructionLabel.setText("Must Set Conditions(Type <all> for all projects)");
             
             condition1Label.setText("Project Code:");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Department Winners")){
             instructionLabel.setText("Must Set Conditions(Type <all> for all years)");
             
             condition1Label.setText("Year:");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Department Candidates")){
             instructionLabel.setText("Must Set Conditions(Type <all> for all years)");
             
             condition1Label.setText("Year:");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Program Managers")){
             instructionLabel.setText("This Displays all Project and Program Managers");
             
             condition1Label.setText("- :");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Hardest Worker")){
             instructionLabel.setText("This Displays who worked on the most projects");
             
             condition1Label.setText(" - :");
             condition2Label.setText(" - :");
         }
         else if(selected.equals("Laziest Worker")){
             instructionLabel.setText("This Displays who worked on the least projects");
             
             condition1Label.setText(" - :");
             condition2Label.setText(" - :");
         }
         
    }//GEN-LAST:event_queryListComboActionPerformed

    private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed
            clearField();
    }//GEN-LAST:event_clearButtonActionPerformed

    private void enterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enterActionPerformed
                 
        String menuItem = actionCombo.getSelectedItem().toString();
        String sqlString = "";
        if(menuItem.equals("New Employee")){
            sqlString = "INSERT INTO EMPLOYEE (" +
                        "employeeNum," +
                        "lastName," +
                        "firstName," +
                        "dateOfBirth," +
                        "address," +
                        "phone," +
                        "degree," +
                        "yearsExperience," +
                        "startSalary," +
                        "currentSalary," +
                        "primaryDepartmentName," +
                        "FT_PT ) VALUES ( " + Field13.getText() + ",'"+
                        Field1.getText()+"','"+Field2.getText()+"','"+
                        Field3.getText()+"','"+Field4.getText()+"',"+
                        Field5.getText()+",'"+Field6.getText()+"',"+
                        Field7.getText()+","+Field8.getText()+","+
                        Field9.getText()+",'"+Field10.getText()+"','"+ 
                        Field11.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
                    
              sqlString = "INSERT INTO EMPLOYEEID (" +
                        "SSN," +
                        "EMPLOYEENUM) VALUES ( "+
                        Field12.getText()+","+Field13.getText()+")";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
                    
                    
                    
        }
        else if(menuItem.equals("New Project")){
            sqlString = "INSERT INTO PROJECT (" +
                        "PROJECTCODE," +
                        "PROJECTNAME," +
                        "PRIMARYDEPARTMENTNAME," +
                        "STATUS," +
                        "STARTDATE," +
                        "ENDDATE) VALUES ( '"+
                        Field1.getText()+"','"+Field2.getText()+"','"+
                        Field3.getText()+"','"+Field4.getText()+"','"+
                        Field5.getText()+"','"+Field6.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("Assign to Project")){
            sqlString = "INSERT INTO EMPLOYEEPROJECT (" +
                        "PROJECTCODE," +
                        "EMPLOYEENUM," +
                        "ROLENAME) VALUES ( '"+
                        Field1.getText()+"','"+Field2.getText()+"','"+
                        Field3.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New Project Role")){
            sqlString = "INSERT INTO PROJECTROLES (" +
                        "PROJECTCODE," +
                        "ROLENAME) VALUES ( '"+
                        Field1.getText()+"','"+Field2.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New Benefit")){
            sqlString = "INSERT INTO BENEFITS (" +
                        "BENEFITNAME) VALUES ( '"+
                        Field1.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New Department")){
            sqlString = "INSERT INTO DEPARTMENT (" +
                        "DEPARTMENTNAME) VALUES ( '"+
                        Field1.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New Colaborator Department")){
            sqlString = "INSERT INTO COLLABORATORDEPARTMENT (" +
                        "PROJECTCODE," +
                        "DEPARTMENTNAME," +
                        "WEEKLYHOURS) VALUES ( '"+
                        Field1.getText()+"','"+Field2.getText()+"',"+
                        Field3.getText()+")";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("Set Winning Department of Year")){
            sqlString = "INSERT INTO DEPARTMENTOFTHEYEAR (" +
                        "YEAR," +
                        "DEPARTMENTNAME) VALUES ( "+
                        Field1.getText()+",'"+Field2.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("Nominate Department of Year")){
            sqlString = "INSERT INTO CANDIDATEDEPARTMENTOFTHEYEAR (" +
                        "YEAR," +
                        "DEPARTMENTNAME) VALUES ( "+
                        Field1.getText()+",'"+Field2.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New Role")){
            sqlString = "INSERT INTO ROLE (" +
                        "ROLENAME," +
                        "MINSALARY," +
                        "MAXSALARY) VALUES ( '"+
                        Field1.getText()+"',"+Field2.getText()+","+
                        Field3.getText()+")";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("Assign Benefit")){
            sqlString = "INSERT INTO EMPLOYEEBENEFITS (" +
                        "EMPLOYEENUM," +
                        "BENEFITNAME," +
                        "STARTDATE," +
                        "ENDDATE) VALUES ( "+
                        Field1.getText()+",'"+Field2.getText()+"','"+
                        Field3.getText()+"','"+Field4.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New PT Category")){
            sqlString = "INSERT INTO PARTTIME (" +
                        "CATEGORYNAME," +
                        "MINHOURLYRATE," +
                        "MAXHOURLYRATE) VALUES ( '"+
                        Field1.getText()+"',"+Field2.getText()+","+
                        Field3.getText()+")";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
        else if(menuItem.equals("New PT Employee")){
            sqlString = "INSERT INTO PARTTIMEEMPLOYEE (" +
                        "EMPLOYEENUM," +
                        "PARTTIMECATEGORYNAME) VALUES ( "+
                        Field1.getText()+",'"+Field2.getText()+"')";
                    System.out.println(sqlString);
                    oc.Execute(sqlString);
        }
             
    }//GEN-LAST:event_enterActionPerformed

    private void actionComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_actionComboActionPerformed
            String menuItem = actionCombo.getSelectedItem().toString();
            String sqlString = "";
            
            if(menuItem.equals("New Employee")){
                jLabel1.setText("Last Name");
                jLabel2.setText("First Name");
                jLabel3.setText("Date of Birth");
                jLabel4.setText("Address");
                jLabel5.setText("Phone");
                jLabel6.setText("Degree");
                jLabel7.setText("Years Experience");
                jLabel8.setText("Start Salary");
                jLabel9.setText("Current Salary");
                jLabel10.setText("Department Name");
                jLabel11.setText("Full/Part Time");
                jLabel12.setText("SSN");
                jLabel13.setText("Employee Num");                                        
            }
            else if(menuItem.equals("New Project")){
                jLabel1.setText("Project Code");
                jLabel2.setText("Project Name");
                jLabel3.setText("Primary Department");
                jLabel4.setText("Status");
                jLabel5.setText("Start Date");
                jLabel6.setText("End Date");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("Assign to Project")){
                jLabel1.setText("Project Code");
                jLabel2.setText("Employee Number");
                jLabel3.setText("Role Name");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New Project Role")){
                jLabel1.setText("Project Code");
                jLabel2.setText("Role Name");
                jLabel3.setText("-");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New Benefit")){
                jLabel1.setText("Benefit Name");
                jLabel2.setText("-");
                jLabel3.setText("-");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New Department")){
                jLabel1.setText("Department Name");
                jLabel2.setText("-");
                jLabel3.setText("-");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New Colaborator Department")){
                jLabel1.setText("Project Code");
                jLabel2.setText("Department Name");
                jLabel3.setText("Weekly Hours");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("Nominate Department of Year")){
                jLabel1.setText("Year");
                jLabel2.setText("Department Name");
                jLabel3.setText("-");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("Set Winning Department of Year")){
                jLabel1.setText("Year");
                jLabel2.setText("Department Name");
                jLabel3.setText("-");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New Role")){
                jLabel1.setText("Role Name");
                jLabel2.setText("Min Salary");
                jLabel3.setText("Max Salary");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("Assign Benefit")){
                jLabel1.setText("Employee Number");
                jLabel2.setText("Benefit Name");
                jLabel3.setText("Start Date");
                jLabel4.setText("End Date");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("Assign Department")){
                jLabel1.setText("Employee Number");
                jLabel2.setText("Benefit Name");
                jLabel3.setText("Start Date");
                jLabel4.setText("End Date");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New PT Category")){
                jLabel1.setText("Category Name");
                jLabel2.setText("Min Hourly Rate");
                jLabel3.setText("Max Hourly Rate");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }
            else if(menuItem.equals("New PT Employee")){
                jLabel1.setText("Employee Number");
                jLabel2.setText("PT Category Name");
                jLabel3.setText("-");
                jLabel4.setText("-");
                jLabel5.setText("-");
                jLabel6.setText("-");
                jLabel7.setText("-");
                jLabel8.setText("-");
                jLabel9.setText("-");
                jLabel10.setText("-");
                jLabel11.setText("-");
                jLabel12.setText("-");
                jLabel13.setText("-");     
      
            }    
            
            
            
    }//GEN-LAST:event_actionComboActionPerformed

    private void queryTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_queryTableMouseClicked
           
            System.out.println(queryTable.getValueAt(queryTable.getSelectedRow(),
                    queryTable.getSelectedColumn()));
    }//GEN-LAST:event_queryTableMouseClicked

    private void queryComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_queryComboBoxActionPerformed
             String selected = queryComboBox.getSelectedItem().toString();
            
            if(selected.equals("Department Info")){        
               ResultSet rs=getResultSet("DEPARTMENT");
               queryTable.setModel(new DepartmentModel(rs));
               
               System.out.println("Department Info");
            }
            else if(selected.equals("Employee Info")){
                
                ResultSet rs=getResultSet("EMPLOYEE");
                queryTable.setModel(new EmployeeModel(rs));
                
                 System.out.println("Employee Info");
            }
            else if(selected.equals("Project Info")){
                
                ResultSet rs=getResultSet("PROJECT");
                queryTable.setModel(new ProjectModel(rs));
                
                System.out.println("Project Info");
            }
            else if(selected.equals("Benefit Info")){
                
                ResultSet rs=getResultSet("BENEFITS");
                queryTable.setModel(new BenefitModel(rs));
                
                System.out.println("Benefit Info");
            }
            else if(selected.equals("Project Roles")){
                 
                ResultSet rs=getResultSet("PROJECTROLES");
                queryTable.setModel(new ProjectRolesModel(rs)); 
                 
                System.out.println("Project Roles");
            }
            else if(selected.equals("Part Time Salary")){
                                 
                ResultSet rs=getResultSet("PARTTIME");
                queryTable.setModel(new PartTimeModel(rs));
            }
            else if(selected.equals("Role Info")){
                 
                ResultSet rs=getResultSet("ROLE");
                queryTable.setModel(new RoleModel(rs));
                
            } 
             
            resultCount.setText(""+queryTable.getRowCount()); 
    }//GEN-LAST:event_queryComboBoxActionPerformed

    private void runQueryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runQueryButtonActionPerformed
            String selected = queryComboBox.getSelectedItem().toString();
            conditions.clear();
            
            if(selected.equals("Department Info")){
                
                conditions.put("DEPARTMENTNAME",colOne.getText());
                
                ResultSet rs=getResultSet("DEPARTMENT",conditions);
                queryTable.setModel(new DepartmentModel(rs));
            }
            else if(selected.equals("Employee Info")){
                System.out.println(colOne.getText());
                
                conditions.put("EMPLOYEENUM",colOne.getText());
                conditions.put("LASTNAME",colTwo.getText());
                conditions.put("FIRSTNAME",colThree.getText());
                conditions.put("DATEOFBIRTH",colFour.getText());
                conditions.put("ADDRESS",colFive.getText());
                conditions.put("PHONE",colSix.getText());
                conditions.put("DEGREE",colSeven.getText());
                conditions.put("YEARSEXPERIENCE",colEight.getText());
                conditions.put("STARTSALARY",colNine.getText());
                conditions.put("CURRENTSALARY",colTen.getText());
                conditions.put("PRIMARYDEPARTMENTNAME",colEleven.getText());
                conditions.put("FT_PT",colTwelve.getText());
                       
                ResultSet rs=getResultSet("EMPLOYEE",conditions);
                queryTable.setModel(new EmployeeModel(rs));
            }
            else if(selected.equals("Project Info")){
                
                conditions.put("PROJECTCODE",colOne.getText());
                conditions.put("PROJECTNAME",colTwo.getText());
                conditions.put("PRIMARYDEPARTMENTNAME",colThree.getText());
                conditions.put("STATUS",colFour.getText());
                conditions.put("STARTDATE",colFive.getText());
                conditions.put("ENDDATE",colSix.getText());
                               
                ResultSet rs=getResultSet("PROJECT",conditions);
                queryTable.setModel(new ProjectModel(rs));
            }
            else if(selected.equals("Benefit Info")){
                conditions.put("BENEFITNAME",colOne.getText());
                
                ResultSet rs=getResultSet("BENEFITS",conditions);
                queryTable.setModel(new BenefitModel(rs));
            }
            else if(selected.equals("Project Roles")){
                conditions.put("PROJECTCODE",colOne.getText());
                conditions.put("ROLENAME",colTwo.getText());
                
                ResultSet rs=getResultSet("PROJECTROLES",conditions);
                queryTable.setModel(new ProjectRolesModel(rs));
            }
            else if(selected.equals("Part Time Salary")){
                conditions.put("CATEGORYNAME",colOne.getText());
                conditions.put("MINHOURLYRATE",colTwo.getText());
                conditions.put("MAXHOURLYRATE",colThree.getText());
                
                ResultSet rs=getResultSet("PARTTIME",conditions);
                queryTable.setModel(new PartTimeModel(rs));
            }
            else if(selected.equals("Role Info")){
                conditions.put("ROLENAME",colOne.getText());
                conditions.put("MINSALARY",colTwo.getText());
                conditions.put("MAXSALARY",colThree.getText());
                
                ResultSet rs=getResultSet("ROLE",conditions);
                queryTable.setModel(new RoleModel(rs));
            }
            resultCount.setText(""+queryTable.getRowCount());
    }//GEN-LAST:event_runQueryButtonActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainView().setVisible(true);
                
            }
        });
    }
    
    
    
    
     public ResultSet getResultSet(String table) {
        
       ResultSet rs=null;
       
       rs=oc.SelectRS(table);
  
        return rs;
        
    }
     
    public ResultSet getResultSet(String table,HashMap conditions) {
       
       
       ResultSet rs=null;      
       rs=oc.SelectRS(table,conditions); 
      
       return rs;
     
        
    }
    
    public ResultSet getAdvResultSet(String query) {
            
       ResultSet rs=null;      
       rs=oc.SelectAdvRS(query); 
      
       return rs;      
    }
    
    public List getConditionsList(HashMap conditions){
        List conditionList = new ArrayList();
        
        conditionList.add(colOne.getText());
        conditionList.add(colTwo.getText());
        conditionList.add(colThree.getText());
        
        return conditionList;
    }
    
    public void clearField(){
        
        Field1.setText("");
        Field2.setText("");
        Field3.setText("");
        Field4.setText("");
        Field5.setText("");
        Field6.setText("");
        Field7.setText("");
        Field8.setText("");
        Field9.setText("");
        Field10.setText("");
        Field11.setText("");
        Field12.setText("");
        Field13.setText("");
        
        
        
    }
     
    private  OracleConnector oc = new OracleConnector();  
    private HashMap<String,String> conditions = new HashMap();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel ColFiveLabel;
    private javax.swing.JLabel ColFourLabel;
    private javax.swing.JLabel ColSixLabel;
    private javax.swing.JPanel DataDeletionPanel;
    private javax.swing.JTextField Field1;
    private javax.swing.JTextField Field10;
    private javax.swing.JTextField Field11;
    private javax.swing.JTextField Field12;
    private javax.swing.JTextField Field13;
    private javax.swing.JTextField Field2;
    private javax.swing.JTextField Field3;
    private javax.swing.JTextField Field4;
    private javax.swing.JTextField Field5;
    private javax.swing.JTextField Field6;
    private javax.swing.JTextField Field7;
    private javax.swing.JTextField Field8;
    private javax.swing.JTextField Field9;
    private javax.swing.JLabel RecordCountLabel;
    private javax.swing.JComboBox actionCombo;
    private javax.swing.JLabel actionLabel;
    private javax.swing.JPanel advancedQueries;
    private javax.swing.JButton clearButton;
    private javax.swing.JTextField colEight;
    private javax.swing.JLabel colEightLabel;
    private javax.swing.JTextField colEleven;
    private javax.swing.JLabel colElevenLabel;
    private javax.swing.JTextField colFive;
    private javax.swing.JTextField colFour;
    private javax.swing.JTextField colNine;
    private javax.swing.JLabel colNineLabel;
    private javax.swing.JTextField colOne;
    private javax.swing.JLabel colOneLabel;
    private javax.swing.JTextField colSeven;
    private javax.swing.JLabel colSevenLabel;
    private javax.swing.JTextField colSix;
    private javax.swing.JTextField colTen;
    private javax.swing.JLabel colTenLabel;
    private javax.swing.JTextField colThree;
    private javax.swing.JLabel colThreeLabel;
    private javax.swing.JTextField colTwelve;
    private javax.swing.JLabel colTwelveLabel;
    private javax.swing.JTextField colTwo;
    private javax.swing.JLabel colTwoLabel;
    private javax.swing.JTextField condition1Field;
    private javax.swing.JLabel condition1Label;
    private javax.swing.JTextField condition2Field;
    private javax.swing.JLabel condition2Label;
    private javax.swing.JLabel dataDeletionTitle;
    private javax.swing.JPanel dataEntryPanel;
    private javax.swing.JLabel dataEntryTable;
    private javax.swing.JPanel dataQueryPanel;
    private javax.swing.JLabel dataQueryTitle;
    private javax.swing.JPanel dataUpdatePanel;
    private javax.swing.JLabel dataUpdateTitle;
    private javax.swing.JLabel dateLabel;
    private javax.swing.JComboBox deleteComboBox;
    private javax.swing.JButton enter;
    private javax.swing.JLabel filtersLabel;
    private javax.swing.JTextField idOne;
    private javax.swing.JLabel idOneLabel;
    private javax.swing.JTextField idTwo;
    private javax.swing.JLabel idTwoLabel;
    private javax.swing.JLabel info;
    private javax.swing.JLabel instructionLabel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JTabbedPane mainTab;
    private javax.swing.JComboBox queryComboBox;
    private javax.swing.JLabel queryLabel;
    private javax.swing.JComboBox queryListCombo;
    private javax.swing.JTable queryTable;
    private javax.swing.JTable queryTable2;
    private javax.swing.JLabel resultCount;
    private javax.swing.JButton runButton;
    private javax.swing.JButton runDelete;
    private javax.swing.JButton runQueryButton;
    private javax.swing.JLabel selectQueryLabel;
    private javax.swing.JLabel title;
    // End of variables declaration//GEN-END:variables
    
}
